2023/9/24 1 min read
Gitea Runnerのコンテナにホストのフォルダをマウントする
Gitea Actionsで生成したファイルをホストにコピーしたい時用
- Gitea Runnerのconfig.yamlを編集
config.yaml
valid_volumes: ["**"]valid_volumesにマウントを許可するボリュームをglob形式で記述する
- Actionのyamlをcontainerで実行する
jobs:
test:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
volumes:
- /volume:/volumeここのマウント元はホストマシンになる。コンテナイメージにcatthehacker/ubuntu:act-latestを使うことで通常と同じ環境で実行できる。